#ifndef CHIPFRAME_H
#define CHIPFRAME_H



//(*Headers(chipFrame)
#include <wx/listctrl.h>
#include <wx/stattext.h>
#include <wx/menu.h>
#include <wx/slider.h>
#include <wx/panel.h>
#include <wx/filedlg.h>
#include <wx/bmpbuttn.h>
#include <wx/dirdlg.h>
#include <wx/frame.h>
#include <wx/timer.h>
//*)

#include <wx/taskbar.h>

#include <vector>
#include "PlayList.h"
#include "Player.h"

class chipFrame: public wxFrame //, public wxTaskBarIcon
{
	public:
		chipFrame(wxWindow* parent,wxWindowID id=wxID_ANY,const wxPoint& pos=wxDefaultPosition,const wxSize& size=wxDefaultSize);
		virtual ~chipFrame();
		void openFiles(wxCommandEvent& event);

		void timerEvent(wxTimerEvent& event);
		void playNext(wxCommandEvent& event);
		void playPrev(wxCommandEvent& event);
		void listBoxEvents(wxCommandEvent& event);
		void addToList(PlayList* curr, PlayListItem *item);
		void setPlayIcon();

		void addFilesToCurrentPlayListFast(wxArrayString paths);
		void addFilesToCurrentPlayList(wxArrayString paths, int addHidden = 0);
		void saveList(wxString path);
		void sliderChange(wxCommandEvent& event);


		std::vector<struct PlayList*> playlists;
		struct Player* player; // temp

		wxTaskBarIcon* taskIcon;
		wxIcon* myIcon;

		//(*Declarations(chipFrame)
		wxFileDialog* fileDialog;
		wxListCtrl* ListCtrl1;
		wxTimer timer;
		wxPanel* Panel1;
		wxDirDialog* dirDialog;
		wxBitmapButton* BitmapButton1;
		wxSlider* slider;
		wxBitmapButton* playButton;
		wxStaticText* curPlayingTime;
		wxMenuBar* menu;
		wxBitmapButton* BitmapButton3;
		wxStaticText* curPlayingTitle;
		wxFileDialog* saveListDialog;
		wxBitmapButton* chipStop;
		//*)

	protected:

		//(*Identifiers(chipFrame)
		static const long ID_BITMAPBUTTON3;
		static const long ID_SLIDER1;
		static const long ID_STATICTEXT2;
		static const long ID_STATICTEXD;
		static const long ID_LISTCTRL1;
		static const long ID_BITMAPBUTTON1;
		static const long ID_BITMAPBUTTON2;
		static const long ID_BITMAPBUTTON4;
		static const long ID_PANEL1;
		static const long ID_TIMER1;
		//*)



	private:

		//(*Handlers(chipFrame)
		void playTrack(wxListEvent& event);
		void OnBitmapButton3Click(wxCommandEvent& event);
		void OnBitmapButton2Click(wxCommandEvent& event);
		void OnBitmapButton2Click1(wxCommandEvent& event);
		void OnplayButtonClick(wxCommandEvent& event);
		void OnClose(wxCloseEvent& event);
		//*)

		DECLARE_EVENT_TABLE()
};

extern chipFrame* chippy;
extern wxString filenameSession;
extern wxString aychipIdentifer;
extern wxString currSongz;
extern wxString currSongPozition;
extern wxString lastFilez;
#endif
